import request from '@/utils/request'

export function getAchievementList(data) {
  return request({
    url: 'achievement/list',
    method: 'post',
    params: { ...data }
  })
}

export function getAchievement(id) {
  return request({
    url: 'achievement/info',
    method: 'post',
    params: { id }
  })
}

export function addAchievement(data) {
  return request({
    url: 'achievement/add',
    method: 'post',
    data
  })
}

export function editAchievement(data) {
  return request({
    url: 'achievement/edit',
    method: 'post',
    data
  })
}

export function editAchievementStatus(id, status) {
  return request({
    url: 'achievement/edit_status',
    method: 'post',
    params: { id, status }
  })
}
